<div class="row-fluid" style="margin-top:5px">
	<div class="span10 offset1" style="margin-bottom:5px;">
      <div class="span12 well well-small" style="padding:0px;">
        <div class="span2" style="padding: 5px;"><img src="<?php echo ($this->brand_info->brand_logo != '' ? $this->basePath($this->brand_info->brand_logo) : $this->basePath($this->frontwebsite()->getGoodsUploadIni('brand', 'brand_image_default'))); ?>"></div>
		<?php echo $this->brand_info->brand_info; ?>
      </div>
      
    </div>
</div>

<div class="row-fluid" id="goods_list">
    <div class="row span10 offset1">
        <div class="span12 goods_img_list">
        <div class="span12 goods_img_list_line">
    <?php
		$sort_c_str   = $this->sort_c != '' ? '&sort_c=' . $this->sort_c : '';
	?>
    	  <div class="span8">
        	<div class="btn-group">
          		&nbsp;&nbsp;<button data-toggle="dropdown" class="btn dropdown-toggle"><?php echo $this->translate('价格'); ?> <span class="caret"></span></button>
          		<ul class="dropdown-menu">
            		<li><a href="?price_sort=ASC<?php echo $sort_c_str; ?>"><?php echo $this->translate('价格上升'); ?><?php if(isset($this->sort_selected) and $this->sort_selected == 'goods_shop_priceASC') echo '&nbsp;<i class="icon-ok"></i>'; ?></a></li>
            		<li><a href="?price_sort=DESC<?php echo $sort_c_str; ?>"><?php echo $this->translate('价格下降'); ?><?php if(isset($this->sort_selected) and $this->sort_selected == 'goods_shop_priceDESC') echo '&nbsp;<i class="icon-ok"></i>'; ?></a></li>
          		</ul>
       	 	</div>
        	<div class="btn-group">
          		<button data-toggle="dropdown" class="btn dropdown-toggle"><?php echo $this->translate('人气'); ?> <span class="caret"></span></button>
          		<ul class="dropdown-menu">
            		<li><a href="?click_sort=ASC<?php echo $sort_c_str; ?>"><?php echo $this->translate('人气上升'); ?><?php if(isset($this->sort_selected) and $this->sort_selected == 'goods_clickASC') echo '&nbsp;<i class="icon-ok"></i>'; ?></a></li>
            		<li><a href="?click_sort=DESC<?php echo $sort_c_str; ?>"><?php echo $this->translate('人气下降'); ?><?php if(isset($this->sort_selected) and $this->sort_selected == 'goods_clickDESC') echo '&nbsp;<i class="icon-ok"></i>'; ?></a></li>
          		</ul>
       	 	</div>
        	<div class="btn-group">
          		<button data-toggle="dropdown" class="btn dropdown-toggle"><?php echo $this->translate('上架时间'); ?> <span class="caret"></span></button>
          		<ul class="dropdown-menu">
            		<li><a href="?time_sort=ASC<?php echo $sort_c_str; ?>"><?php echo $this->translate('时间上升'); ?><?php if(isset($this->sort_selected) and $this->sort_selected == 'goods_add_timeASC') echo '&nbsp;<i class="icon-ok"></i>'; ?></a></li>
            		<li><a href="?time_sort=DESC<?php echo $sort_c_str; ?>"><?php echo $this->translate('时间下降'); ?><?php if(isset($this->sort_selected) and $this->sort_selected == 'goods_add_timeDESC') echo '&nbsp;<i class="icon-ok"></i>'; ?></a></li>
          		</ul>
       	 	</div>
           </div>
           <div class="span4">        
            <span class="pull-right"><?php echo $this->translate('共'); ?> <font color="#ED154B"><?php echo $this->goods_list->getTotalItemCount(); ?><?php echo $this->translate('个'); ?></font> <?php echo $this->translate('商品'); ?>&nbsp;&nbsp;</span>
           </div>
        </div>
        <div class="well" id="right_goods_list">
        	<ul class="thumbnails">
            	<?php
                $goodsIdStr = '';
                if ($this->goods_list->getTotalItemCount() > 0) { foreach ($this->goods_list as $goods_value) {
                    $goodsIdStr .= $goods_value['goods_id'] . ',';
                    ?>
            	<li class="span3">
                <a class="thumbnail" title="<?php echo $this->escapeHtml($goods_value['goods_name']); ?>" href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$goods_value['goods_id'], 'class_id'=>$goods_value['one_class_id'])); ?>"><img src="<?php echo $this->basePath($this->frontwebsite()->shopGoodsImage($goods_value['goods_thumbnail_image'])); ?>" border="0"></a>
                <p class="goods_title link_googds_name"><a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$goods_value['goods_id'], 'class_id'=>$goods_value['one_class_id'])); ?>"><?php echo $this->escapeHtml($goods_value['goods_name']); ?></a></p>
                <?php if ($goods_value['goods_extend_name'] != '') { ?>
                <p class="goods_title extend_goods_name" style="color: #ed145b;"><?php echo $this->escapeHtml($goods_value['goods_extend_name']); ?></p>
                <?php } ?>
                <p><?php echo $this->translate('价格');?>:<strong class="goods_price" id="goods_price_<?=$goods_value['goods_id']?>"><?php
						$goodsPrice = (isset($goods_value['group_price']) and $goods_value['group_price'] > 0) ? $goods_value['group_price'] : $goods_value['goods_shop_price'];
						echo $this->frontwebsite()->shopPriceExtend($goodsPrice);
						?></strong></p>
                </li>
                <?php } } else { echo '<li>' . $this->translate('本品牌暂无商品！') . '</li>'; } ?>
            </ul>
        </div>
        		<?php echo ( count($this->goods_list) > 0 ) ? $this->paginationControl($this->goods_list, 'Sliding', 'site/dbpage',array('page_url'=>$this->url('frontbrand/default/front-brand-id',array('action'=>'brandGoods', 'brand_id'=>$this->brand_info->brand_id)))) : ""; ?>
        </div>
    </div>

</div>
<?php if(defined('FRONT_CACHE_STATE') and FRONT_CACHE_STATE == 'true') { ?>
    <script>
        $.post('<?php echo $this->url('frontgoodslist/default',array('action'=>'ajaxGoodsGroupPrice')); ?>',{goodsIdStr:'<?=$goodsIdStr?>'}, function(data){
            if(data.state == 'true') {
                for (var i = 0; i < data.list.length; i++) {
                    $('#goods_price_'+data.list[i].id).html(data.list[i].price);
                }
            }
        },'json');
    </script>
<?php } ?>